home *** CD-ROM | disk | FTP | other *** search
/ Hacker's Arsenal - The Cutting Edge of Hacking / Hacker's Arsenal - The Cutting Edge of Hacking.iso / texts / hackunix.txt < prev    next >
Text File  |  2001-07-11  |  42KB  |  1,100 lines

  1. ]
  2. *> Press [X] to Abort / [CR] to Continue: []
  3.  
  4. *> Title:   Hacking UNIX
  5. *> Date:    6/10/89
  6. *> Time:    12:20 pm
  7.  
  8.  
  9.  
  10.  
  11.      /|\/|\/|\/|\/|\/|\/|\/|\/|\/|\/|\/|\/|\/|\/|\/|\/|\/|\/|\/|\
  12.      \|/                                                      \|/
  13.      /|\                                                      /|\
  14.      \|/        An Indepth Guide in Hacking UNIX and the      \|/ 
  15.      /|\           concept of Basic Networking Utility        /|\
  16.      \|/        ----------------------------------------      \|/
  17.      /|\                   By:Red Knight                      /|\
  18.      \|/        Phreakers/Hackers Underground Network         \|/
  19.      /|\                                                      /|\
  20.      \|/\|/\|/\|/\|/\|/\|/\|/\|/\|/\|/\|/\|/\|/\|/\|/\|/\|/\|/\|/
  21.  
  22. Brief history on UNIX
  23. ----------------------
  24. Its because of Ken Tompson that today were able to Hack Unix.He used to work
  25. for Bell Labs in the 60s.Tompson started out using the MULTICS OS which was
  26. later eliminated and Tompson was left without an operating system to work with.
  27. Tompson had to come up with something real quick.He did some research and
  28. and in 1969 UNIX came out,which was a single user and it didn't have
  29. many capabilities.A combined effort with others he rewrote the version
  30. in C and added some good features.This version was out in 1973 and was
  31. available to the public.This was the first begining of UNIX as its known      
  32. presently.The more refined version of UNIX,today know as UNIX system V      
  33. developed by Berkley University has unique capabilities.
  34. Various types of UNIXes are CPIX,Berkeley Ver 4.1,Berkeley 4.2,FOS,Genix,HP-UX,
  35. IS/I,OSx,PC-IX,PERPOS,Sys3,Ultrix,Zeus,Xenix,UNITY,VENIX,UTS,Unisys,Uniplus+,
  36. UNOS,Idris,QNIX,Coherent,Cromix,System III,System 7,Sixth edition.
  37.  
  38. The article it self:
  39. --------------------
  40. I believe that hacking into any system requires knowledge of the Operating
  41. system itself.Basically what I will try to do is make you more familiar with
  42. UNIX  operation ,its usefull commands that will be advantageous to you as a  
  43. hacker.This article contains in depth explainations.                      
  44.  
  45. Error Messages that one may came across:[UNIX system V]
  46. ----------------------------------------
  47. Login incorrect - An ivalid ID and/or pw was entered.This means nothing.
  48.                   In UNIX there is no way guessing valid user IDs.You may     
  49.                   come across this one when trying to get in.
  50. No more logins - will happens when the system wont accept anymore logins
  51.                  could be going down            
  52. Unknown Id - will happen if an ivalid id is entered using (su) command
  53. Unexpected eof in file - The file being stripped file has been damaged
  54. Your password has expired - This is quiet rare although there have been cases
  55.                             where it happened.Reading the etc/passwd will
  56.                             show you at how many intervals it changes.
  57. You may not change the password - The password has not yet aged enough.The
  58.                                   Administrator set the quotas for the users
  59. Unknown group [groups name] - occurs when chgrp is executed ,group doesn't
  60.                               exist
  61. Sorry - Indicated that you have typed in an invalid super user password(execu-
  62.         tion of the su)
  63. Permission denied!- Indicated you must be the owner or a super user to change
  64.                     password.
  65. Sorry <[# of weeks] since last change - This will happen when password has    
  66.                                         has not aged enough and you tried to
  67.                                         change it(passwd)
  68. [directory name]:no permission - You are trying to remove a directory which
  69.                                  you have no permission to.
  70. [file name] not removed - trying to delete a file owned by another user
  71.                           that you dont have write pemision for. 
  72. [dirname] not removed - ownership of the dir is not your that your trying to  
  73.                         delete. 
  74. [dirname] not empty - the directory contains files so you must have to delete
  75.                       the files before executing the rmdir 
  76. [command] not found - you have entered an ivalid command not know to UNIX
  77. cant execute pwd - some thing wrong with the system cant execute pwd command
  78. cannot chdir to .. -   (.. one level up) permision is required to execute pwd
  79.                        above the current directory
  80. cant open [file name] - defined wrong path,file name or you have no read
  81.                         permission
  82. cp:[file name] and [file name] are identical - self explanatory  
  83. cannot locate parent directory - occurs when using mv
  84. [file name] not found - file which your trying to move doesn't exsist
  85. You have mail - Self explanatory
  86.  
  87. Basic Networking Utility error messages
  88. ---------------------------------------
  89. cu:not found - networking not installed
  90. login failed - invalid id/pw or wrong # specified
  91. dial failed - the systen never answered due to a wrong #
  92. uucp completely failed - did not specify file after -s
  93. wrong time to call - you called at the time at a time not specified in the
  94.                      Systems file
  95. system not in systems - you called a remote not in the systems file
  96.  
  97. Logon format : first thing one must do is switch to lower case
  98. --------------
  99. Identifing a UNIX.Here is what you'll see:
  100. Some times there will be no system identifer
  101.                              
  102. AT&T UNIX SysVR3.0 (eg of a system identifier)
  103.  
  104. login:
  105.  or
  106. Login:
  107.  
  108. Any of these is a UNIX.Here is where you will have to guess at a user valid
  109. id.Here are some that I have come across eg( glr,glt,radgo,rml,chester,cat,
  110. lom,cora,hlto,hwill,edcasey and also some containing numbers smith1,mitu6 or
  111. special characters in it like bremer$,j#fox.Login names have to be 3 to 8
  112. chracters in lenght lowercase and must start with a letter.In some XENIX
  113. systems one may login as "guest"
  114.  
  115. User level accounts:(lower case)
  116. -------------------- 
  117. In Unix they have whats called accounts .These
  118. accounts can be used at the "login:" prompt.
  119. Here is a list:
  120.  
  121. sys
  122. bin
  123. trouble
  124. daemon
  125. uucp
  126. nuucp  
  127. rje
  128. lp
  129. adm
  130. listen - if starlan is installed
  131.  
  132. Super-user accounts:
  133. --------------------
  134. And then there are super-user login which make UNIX worth hacking.   
  135. The accounts are used for a specific job. In large systems these logins
  136. are assingned to users who have a responsibilty to maintain subsystems.
  137.  
  138. They are as follows :(all lower case)
  139.  
  140. root       -  this is a must the system comes configured with it.It has no
  141.               restriction.Has power over every other account.
  142. unmountsys -  unmounts files
  143. setup      -  system set up
  144. makefsys   -  makes a new file
  145. sysadm     -  allows useful S.A commands(doesn't need root login)
  146. powerdown  -  powering system down
  147. mountfsys  -  mounts files
  148. checkfsys  -  checks file
  149.  
  150. These accounts will definitly have passwords assigned to them.These
  151. accounts are also commands used by the system administrator.
  152.  
  153. Here are some examples of accounts I have seen:
  154.  
  155. cron         uuhelp     usenet
  156. anonuccp     news       network
  157. bellboy      lp         vector
  158. guest        games      ninja
  159. vote         warble     sysinfo
  160.  
  161.  
  162.  
  163. After the login prompt you will receive a password prompt:
  164.  
  165. password:
  166.   or
  167. Password:
  168.     
  169. Enter the password (it wont echo).The password rule is as follows:Each pw
  170. has to contain at least 6 characters and maximum has to be 8 .Two of which are
  171. to be alphabetic letters and at least one being a number or a special character
  172. The alphabetic digits could be in upper case or lower case.Here are some of the
  173. passwords that I have seen (eg.Ansuya1,PLAT00N6,uFo/78,ShAsHi..,Div417co)
  174.  
  175. The passwords for the super user accounts will be difficult to hack
  176. try  the accounts interchangebly eg.login:sysadm password:makefsys or rje1,
  177. sysop,sysop1,bin4 or they might contain letter,numbers,special chracters in
  178. them.It could be anything.The user passwords are changed by an aging proccess
  179. at successive intervals.The users are forced to changed it.The super-user
  180. will pick a password that wont need changing for a long period of time.
  181.  
  182. You have made it! 
  183. ----------------- 
  184. The hard part is over and hopefully you have hacked a super-user account.
  185. Remember Control-d stops a process and also logs you off.
  186. The next thing you'll probably see is the system news
  187. eg.
  188.  
  189. login:john 
  190. password:hacker1        
  191. System news                 
  192. There will be no networking offered to the users till
  193. august 15,due to hardware problems.             
  194. (just an example)
  195.  
  196. $
  197.  
  198. $ is the Unix prompt -waiting for a command to be entered.I will use this
  199.                       throught the article to show outouts etc..(Its not
  200.                       part of the command)
  201. # - means your logged in as root(very good)
  202.  
  203. A word about the XENIX System III:(run on the tandy 6000)
  204. ---------------------------------                  
  205. The largest weakness in the XENIX System III occurs after the installation
  206. of the Profile-16 or more commonly know as the filepro-16.I have seen the     
  207. filepro-16 installed in many systems.          
  208. The installation process creates an entry in the password file for a user  
  209. named \fBprofile\fR ,an account that who owns and administors the database.
  210. The great thing about it is that when the account is created ,no password is
  211. assigned to it.The database contains executable to maintain it.The database
  212. creation programs perform a \fBsetuid\fR to boot up the \fBoot\fR  there by 
  213. giving a person the whole C Shell to gain Super User privilege same as root.
  214. Intresting huh!
  215.                      
  216.  
  217. * Note: First the article will inform you of how the Unix is made up
  218.  
  219. The Unix is made if three components-The shell,the kernal,file system.
  220.  
  221. The kernal:
  222. -----------
  223. You could say that the kernal is the heart of the Unix operating system.
  224. The kernal is a low level language lower than the shell which maintains
  225. processes .The kernal handles memory usage ,maintains file system
  226. the sofware and hardware devices.
  227.  
  228. The shell:
  229. ----------
  230. The shell a higher level language. The shell had two important uses,
  231. to act as command interpreture for example using commands like cat,who,       
  232. ls the the shell is at work figuring out whether you have entered a command
  233. correctly or not.The second most important reason for the shell is its ability
  234. to be used as programing language.Suppose your performing some tasks      
  235. repeatedly over and over again,You can program the shell to do this for you.
  236.          
  237. The file system:   
  238. ---------------
  239. The file system in Unix is divede into 3 catagories:Directories,ordinary files
  240. and special files.(d,-)
  241.           
  242. Basic stucture:        
  243. (/)-this is abreviation for the root dirctory.
  244.   root level                      root
  245.                                   (/)                                  system
  246. -------------------------------------|----------------------------------level
  247. |      |        |         |                  |        |       |        |
  248. /unix   /etc    /dev      /tmp               /lib     /usr    /usr2    /bin
  249.         |                                        _____|_____
  250. login passwd                                     |    |    |
  251. level                                            /john  /cathy    
  252.                              ________________________|_______________
  253.                             |        |     |      |        |        |
  254.                         .profile   /mail  /pers  /games   /bin     /michelle
  255. *.profile - in case                        |    __|______  |      __|_______
  256.  you wich to change your enviroment     capital |        | data   |         |
  257. but after you log off.It sets to              othello  starwars letter letter1
  258. default.                                     
  259.  
  260. the /unix-is the kernal
  261. /etc - contains system administrators files,Most are not available to the
  262.        regular user.(this directory contains the /passwd file)
  263.  
  264.     Here are some files under /etc directory:
  265.     /etc/passwd
  266.     /etc/utmp
  267.     /etc/adm/sulog
  268.     /etc/motd
  269.     /etc/group
  270.     /etc/conf
  271.     /etc/profile
  272.   
  273. /dev - contains files for physical devices such as printer and the disk drives
  274. /tmp - temporary file directory
  275. /lib - dirctory that contains programs for high level languages
  276. /usr - this directory contains dirctories for each user on the system
  277.  
  278.      Eg. of a list of files under /usr
  279.     /usr/tmp
  280.     /usr/lib
  281.     /usr/docs
  282.     /usr/news
  283.     /usr/spool 
  284.     /usr/spool/lp
  285.     /usr/lib/uucp
  286.  
  287. /bin - contain executable programs (commands)
  288.  
  289. The root also contains:                                                       
  290. /bck - used to mount a back up file system.
  291. /install - Used to install and remove utilities
  292. /lost+found - This is where all the removed files go,This dir is used by fsck
  293.               (1M)
  294. /save -A utility used to save data
  295. /mnt - Used for temporary mounting
  296.  
  297. **Now the fun part scouting around**
  298.  
  299.                  Local commands (Explained in details)
  300.                  -------------------------------------
  301. At the unix prompt type the pwd command-it will show you the current working
  302. directory you are in.
  303.  
  304. $ pwd
  305. $ /usr/admin - assuming that you have hacked into a super user acc checkfsys
  306. $
  307.  
  308. This gives you the full login directory.The / before tell you the location
  309. of the root directory                     
  310.  
  311. or
  312.  
  313. (REFER TO THE DIAGRAM ABOVE)
  314. $ pwd
  315. $ /usr/john   
  316. $
  317. Assuming you have hacked into johns acc.
  318.  
  319. Now lets say you wanted to move down to the michelle directory( you own this)
  320. that contains letters.You would type in
  321.  
  322. $ cd michelle or cd usr/john/michelle
  323. $ pwd
  324. $ /usr/john/michelle
  325. $
  326.  
  327. Going back one directory up type in:
  328. $ cd ..
  329. or going to your parent directory just type in "cd"
  330.       
  331. Listing file directories assuming you are in the parent directory:
  332.  
  333. $ ls /usr/john
  334. mail
  335. pers
  336. games        
  337. bin
  338. michelle
  339. This wont give you the .profile file .To view it type
  340. $ cd
  341. $ ls -a
  342. :
  343. :
  344. .profile
  345.  
  346. To list file names in michelles directory type in:
  347. $ ls michelle (that if your in the johns directory)
  348. $ ls /usr/john/michelle(parent dir)
  349.  
  350. ls -l            
  351. -----             
  352. The ls -l is an an important command in unix.This command displays the whole
  353. directory in long format :Run this in parent directory
  354.  
  355. $ ls -l
  356. total 60
  357. -rwxr-x---    5 john      bluebox    10 april 9  7:04  mail
  358. drwx------    7 john      bluebox    30 april 2  4:09  pers
  359.      :            :         :         :     :      :    :
  360.      :            :         :         :     :      :    :
  361. -rwxr-x---     6 cathy    bluebox    13 april 1  13:00 partys
  362.      :            :         :         :     :      :    :
  363. $
  364.    
  365. The total 60 tells one the ammount of disk space used in a directory.The     
  366. -rwxr-x--- is read in triples of 3.The first chracter eg(-,d,b,c)-means as
  367. follows: - is an ordinary file ,d is a directory,b is block file,c is a
  368. chracter file.
  369. The r stands for read permission,w is write permission,x is execute.The first
  370. colum is read in 3 triples as stated above.The first group of 3 (in -rwxr-x---)
  371. after the "-" specifies the permission for the owner of the file,the second
  372. triple are for the groups (the fourth colum) and the last triple are the      
  373. permissions for all other users.Therefore the -rwxr-x--- is read as follows.
  374. The owner john has permission to read,write and execute anything in the bin
  375. directory but the group has no write permission to it and the rest of the users
  376. have no permission at all.The format of one of the lines in the above output
  377. is as follows:
  378.  
  379. file type-permissions,links,usersname,group,bytes taken,date,time when last
  380. renued,directory or file name.
  381. **You will be able to read,execute cathys file named party due to the same
  382. group***
  383.  
  384. chmod                    
  385. -----             
  386. The chmod command changes permission of a directory or a file.Format is
  387. chmod who+,-,=r,w,x
  388. The who is substituted by u-user,g-group,o-other users,a-all.
  389. The + means add permission,- means remove permission,= - assign.  
  390. Example :If you wanted all other users to read the file name mail ,type:   
  391.  
  392. $ chmod o+r mail
  393.  
  394. cat         
  395. ---          
  396. Now suppose you wanted to read the file letter .There are teo ways to doing
  397. this.First go to the michelle directory then type in:
  398.  
  399. $ cat letter
  400. line one ...\
  401. line two ... }the output of letter
  402. line three../
  403. $
  404.    or
  405. If you are in the parent directory type in:
  406. $ cat /usr/john/michelle/letter
  407. and you will have the same output.
  408.  
  409. Some cat options are  -s,-u,-v,-e,-t
  410.  
  411. Special Chracters in Unix:
  412. -------------------------
  413. *  - matches any number of single characters eg. ls john* will list
  414.      all files that begin with john
  415. [...] - matchs any one of the chracter in the [ ]
  416. ? - matches any single chracter
  417. runs a process in the backgroung leaving your terminal free
  418. $ - Values used for variables also $n - null argument
  419. > - redirectes output
  420. < - redirects input to come from a file
  421. >> - redirects command to be added to the end of a file
  422. | - pipe output (eg:who|wc-l tells us how many users are online)
  423. "..." - Turn of meaning of special chracters excluding $,`
  424. `...` - allows command output in to be used in a command line
  425. '...' - turns of special meaning of all chracters
  426.  
  427. continuation of local commands...[     ] -contains the options used
  428. ------------------------------- 
  429. passwd
  430. ------
  431. Password changing seems to be a big thing among the savants.Anyway to change
  432. the password one would use the 'passwd' command as shown below:
  433.  
  434.    $passwd
  435.    Changing password for john
  436.    Old password:                              
  437.    New password:                              
  438.    Retype new password:
  439.    $
  440.   
  441. This will only work when the password has aged enough
  442.  
  443. ps
  444. --
  445. Its sometimes necessary to see what command procesess you are running,this
  446. command lets you see that.
  447. ps [-a all processes except group leaders] [-e all processes] [-f the whole
  448.    list]                                                           
  449.  
  450.    $ps
  451.    PID   TTY  TIME   COMMAND
  452.    200   tty09 14:20  ps
  453.  
  454.    The systems reports (PID - process idenetification number which is a #
  455.    from 1-30,000 assigned to UNIX processes)
  456.    It also reports the TTY,TIME and the COMMAND being executed at the time.
  457.    To stop a process enter :    
  458.  
  459.    $kill [PID] (this case its 200)
  460.    200 terminated
  461.    $
  462.  
  463. grep
  464. ----
  465. This comand is important when seaching for a word or words in large files.
  466.  
  467. grep [argument] [file name] - searchs for an file that contains the argument
  468.                               for example:
  469.    $ grep phone cathy
  470.     phone   michelle  (718)5551234
  471.     phone   cindy   (718)5553456
  472.  
  473.     What this did was to find the argument 'phone' in the file cathy.If the
  474.     argument consists of two or more words then  it must be enclosed in single
  475.     quotes.
  476.  
  477.  
  478. mv
  479. --
  480. mv [file names(s)] [ dir name ] - renames a file or moves it to another     
  481.                                   directory eg.      
  482.    $mv letter letters 
  483.    $
  484.    This renames the file letter to letters thereby deleting letter
  485.                   or if you want to move files then
  486.    $mv /usr/john/pers/capital /usr/john/michelle/capital
  487.    $   
  488.    This moves the file capital to the directory named michelle
  489.  
  490. diff
  491. ----
  492. diff [file name] [ file name] - show diffrence between two files.Output of this
  493.                                 will have something like 4,5c4,5 then the it
  494.                                 will display both sets of files on the screen
  495.                                 The 4,5c4,5 means that you must change "c"
  496.                                 lines 4 to 5 in one file to line 4 to 5 in   
  497.                                 another.
  498.       Option for using this command are :
  499.        -b  -  it ignores blank spaces
  500.        -h  - compares it quickly
  501.        -s  - reports files that are the same
  502.        -S[file] - this is when you want to compare a directory starting at a
  503.                   specific file
  504.        
  505.  
  506.        There is also a command to compare 3 files which is :   
  507.  
  508.        diff3 [options] [file1] [file2] [file3]
  509.  
  510. cp
  511. --
  512. cp [file name] [file name] - makes a copy of a file
  513.  
  514.    $ cp letter letters
  515.    $
  516.    The file letters is a dupilcate copy of letter.In this case the original
  517.    is not erased like in the mv command
  518.  
  519.  
  520.  
  521. .... more UNIX commands:
  522. --------------------
  523.  
  524. man [command] or [c/r] -will give you a list of commands explainations
  525.  
  526. help - available on some UNIX systems
  527.                   
  528. mkdir [dir name(s)] - makes a directory      
  529.  
  530. rmdir [dir name(s)] - removes directory.You wont be able to remove the
  531.                       directory if it contains files in them
  532.  
  533. rm [file name(s)] - removes files. rm * will erase all files in the current
  534.                     dir.Be carefull you!!.Some options are :                
  535.                     [-f unconditional removal] [-i Prompts user for y or n]
  536.                         
  537. write [login name ] - to write to other logged in users.Sort of a chat
  538.  
  539. mesg [-n] [-y] - doesn't allow others to send you messages using the write
  540.                  command.Wall used by system adm overrides it.
  541.  
  542. $ [file name] - to execute any file
  543.  
  544. wc [file name] - Counts words,chracters,lines in a file
  545.  
  546. stty [modes] - Set terminal I/O for the current devices
  547.  
  548. sort [filename] - Sorts and merges files many options
  549.  
  550. spell [file name] > [file name] - The second file is where the misspelt words
  551.                                   are entered
  552.  
  553. date [+%m%d%y*] [+%H%%M%S] - Displays date acoording to options
  554.  
  555. at [-r] [-l] [job] - Does a specified job at a specified time.The -r Removes 
  556.                      all previously scheduled jobs.The -l reports the job #
  557.                      and status of all jobs scheduled
  558.  
  559. write [login] [tty] - Sends message to the login name.Chat!
  560.  
  561.  
  562.  
  563. su [login name]
  564. ---------------
  565. The su command allows one to switch user to a super user to a user.Very
  566. important could be used to switch to super user accounts.
  567. Usage:                                                
  568.  
  569. $ su sysadm
  570. password:
  571.  
  572. This su command will be monitored in /usr/adm/sulog and this file of all files
  573. is carefully monitered by the system administrator.Suppose you hacked in johns
  574. account and then switched to the sysadm account (ABOVE) your /usr/adm/sulog
  575. entry would look like:
  576.  
  577. SU  04/19/88  21:00 + tty 12 john-sysadm
  578.  
  579. Therfore the S.A(system administrator) would know that john swithed to sysadm
  580. account on 4/19/88 at 21:00 hours
  581.  
  582. Searching for valid login names:   
  583. -------------------------------
  584. Type in-
  585. $ who  ( command informs the user of other users on the system)
  586. cathy  tty1  april 19  2:30
  587. john   tty2  april 19  2:19
  588. dipal  tty3  april 19  2:31
  589. :
  590. :
  591. tty is the users terminal,date,time each logged on.dipal,john are valid
  592. logins.   
  593.  
  594. Files worth concatenating(cat)
  595. /etc/passwd file:                    
  596. -----------------                     
  597. The etc/passwd is a vital file to cat.For it contains login names of all
  598. users including super user accounts and there passwords.In the newer          
  599. SVR3 releases they are tighting their security by moving the encrypted
  600. passwords from /etc/passwd to /etc/shadow making it only readable by root.
  601. This is optional offcourse.
  602.  
  603. $ cat /etc/passwd
  604. root:D943/sys34:0:1:0000:/:
  605. sysadm:k54doPerate:0:0:administration:usr/admin:/bin/rsh
  606. checkfsys:Locked;:0:0:check file system:/usr/admin:/bin/rsh
  607. :
  608. other super user accs.
  609. :
  610. john:chips11:34:3:john scezerend:/usr/john:
  611. :
  612. other users
  613. :
  614. $
  615. If you have reached this far capture this file as soon as posible.
  616. This is a typical output etc/passwd file.The entries are seperated
  617. by a ":".There made be up to 7 fields in each line.
  618. Eg.sysadm account.
  619. The first is the login name in this case sysadm.The second field contains the
  620. password.The third field contains the user id."0 is the root".Then comes the
  621. group id then the account which contains the user full name etc .The sixth
  622. field is the login directory defines the full path name of the the particlar 
  623. account and the last is the program to be executed.          
  624. Now one can switch to other super user account using su command descibed above.
  625. The password entry in the field of the checkfsys account in the above example
  626. is "Locked;". This doesn't mean thats its a password but the account
  627. checkfsys cannot be accessed remotely.The ";" acts as an unused encryption
  628. chracter.A space is also used for the same purpose.You will find this in many
  629. UNIX systems that are small systems where the system administrator handles
  630. all maintaince.  
  631.  
  632. Password aging:  
  633. ---------------
  634. If password aging is active the user is forced to change the password at    
  635. regular intervals.One may be able to tell just by looking at the /etc/passwd
  636. file when the password is allowed to be changed and when it is compulsory to
  637. change it.
  638. For example the entry:
  639.  
  640. john:chips11,43:34:3:John Scezerend:/usr/john:
  641.  
  642. The password contains an extension of (,43) which mean that john can change has
  643. to change the password atleast evert 6 weeks and can keep it for atleast 3
  644. week.The format used is [password],Mmww.The M is the maxiumum number of weeks
  645. password has to be change and m is the minimum interval password can be changed
  646. and the ww is indicates when the password was last changed.
  647.  
  648.     Aging chart:
  649. ---------|-----------
  650. Character|# of weeks
  651.     .    |  0
  652.     /    |  1
  653.  0-9     | 2-11
  654.  A-Z     | 12-37
  655.  a-z     | 38-63
  656. ---------|-----------
  657.  
  658. From the above anyone can determine the number of weeks one can chnage the    
  659. password.         
  660.  
  661. The (ww) is automatically added as to when the password was last changed .   
  662.  
  663. IF SHAWDOWING IS ACTIVE:
  664. ------------------------
  665.  
  666. If the shawdowing is active the /etc/passwd would look like this:
  667.  
  668. root:x:0:1:0000:/:
  669. sysadm:x:0:0:administration:/usr/admin:/bin/rsh
  670.  
  671. The password filed is substituted by "x".
  672.  
  673. The /etc/shawdow file only readable by root will look similar to
  674. this:
  675.  
  676. root:D943/sys34:5288::
  677. :
  678. super user accounts
  679. :
  680. Cathy:masai1:5055:7:120
  681. :
  682. all other users
  683. :  
  684.  
  685. The first field contains users id:the second contains the password(The pw will
  686. be NONE if logining in remotely is deactivated):the third contains a code of
  687. when the password was last changed:the fourth and the fifth contains the 
  688. minimum and the maximum numbers of days for pw changes(Its rare that you will
  689. find this in the super user logins due to there hard to guess passwords)
  690.  
  691.   
  692. /etc/options directory
  693. -----------------------
  694. The etc/options dir will consists of utilities available in the system.
  695. Example:                  
  696. -rwxr-xr-x   1 root  sys   40 april  1:00  uucp.name                
  697. uucp standing for BNU
  698.  
  699. /etc/group
  700. -----------
  701. The file has each group on the system.Each line will have 4 entries separated
  702. by a ":" . Example of concatenated /etc/group:
  703.  
  704. root::0:root
  705. adm::2:adm,root
  706. bluebox::70:
  707.  
  708. Group name:password:group id:login names
  709. ** It very unlikely that groups will have passwords assigned to them **
  710. The id "0" is assigned to /
  711.  
  712. Sending and recieving messages:
  713. -------------------------------
  714. Two programs are used to manage this.They are mail & mailx.The difference
  715. between them is that mailx is more fancier thereby giving you many choices
  716. like replying message ,using editors etc.
  717. Sending:
  718. --------  
  719. The basic format for using this command is:
  720.  
  721. $mail [login(s)]
  722. (now one would enter the text
  723. after finishing enter "." a period
  724. on the next blank line)
  725. $
  726. This command is also used to send mail to remote systems.Suppose you wanted
  727. to send mail to john on a remote called ATT01
  728. you would type in:
  729.  
  730. $mail ATT01!john
  731.  
  732. Mail can be sent to several users,just by entering more login name after
  733. issuing the mail command
  734.  
  735. Using mailx is the same format:(This I'll describe very briefly)
  736. $mailx john
  737. subject:(this lets you enter the subject)
  738. (line #1)
  739. (line #2)
  740. (After you finish enter (~.) not the brackets offcourse ,more commands are
  741. available like ~p,~r,~v,~m,~h,~b etc.)
  742.  
  743. Receiving:
  744. ----------
  745. After you log on to the system you will the account may have mail waiting.
  746. You will be notified "you have mail".   
  747. To read this enter:       
  748. $mail
  749. (line #1)
  750. (line #2)
  751. (line #3)
  752. ?       
  753. $
  754. After the message you will be prompted with a question mark.Here you have a
  755. choice to delete it by entering d,saving it to view it later s,or just press
  756. enter to view the next message.
  757. (DONT BE A SAVANT AND DELETE THE POOR GUYS MAIL)
  758.  
  759. Super user commands:
  760. --------------------
  761. $sysadm adduser - will take you through a routine to add a user
  762.                  (may not last long)
  763.  
  764. Enter this:
  765.  
  766. $ sysadm adduser
  767. password:
  768. (this is what you will see)
  769. /--------------------------------------------------------------------------\
  770.   Process running succommmand `adduser`     
  771.   USER MANAGMENT
  772.  
  773.   Anytime you want to quit, type "q".
  774.   If you are not sure how to answer any prompt, type "?" for help
  775.  
  776.   If a default appears in the question,press <RETURN> for the default.
  777.  
  778.   Enter users full name [?,q]: (enter the name you want)                
  779.   Enter users login ID [?,q]:(the id you want to use)
  780.   Enter users ID number (default 50000) [?,q) [?,q]:( press return )
  781.   Enter group ID number or group name:(any name from /etc/group)
  782.   Enter users login home directory:(enter /usr/name)
  783.     
  784.   This is the information for the new login:
  785.   Users name: (name)
  786.   login ID:(id)
  787.   users ID:50000
  788.   group ID or name:     
  789.   home directory:/usr/name
  790.  Do you want to install,edit,skip [i,e,s,q]? (enter your choice if "i" then)
  791.  Login installed
  792.  Do you want to give the user a password?[y,n] (its better to enter one)
  793.  New password:
  794.  Re-enter password:   
  795.  
  796.  Do you want to add another login?
  797. \----------------------------------------------------------------------------/
  798.  
  799. This is the proccess to add a user.Since you hacked into a super user account
  800. you can make a super user account by doing the following by entering 0 as an
  801. user and a group ID and enter the home directory as /usr/admin.This will give
  802. you as much access as the account sysadm
  803. **Caution** - Do not use login names like Hacker,Cracker,Phreak etc .This is
  804. a total give away.                                                           
  805. The process of adding a user wont last very long the S.A will know when he
  806. checks out the /etc/passwd file
  807.  
  808. $sysadm moduser - This utility allows one to modify users.DO NOT ABUSE!!!
  809. Password:
  810.  
  811. This is what you'll see:
  812.  
  813. /----------------------------------------------------------------------------\
  814. MODIFYING USER'S LOGIN
  815.  
  816. 1)chgloginid  (This is to change the login ID)
  817. 2)chgpassword (Changing password)
  818. 3)chgshell (Changing directory DEFAULT = /bin/sh)
  819.  
  820. ENTER A NUMBER,NAME,INITIAL PART OF OF NAME,OR ? OR <NUMBER>? FOR HELP,
  821. Q TO QUIT ?
  822. \----------------------------------------------------------------------------/
  823.  
  824. Try every one of them out.Do not change someones password.It creates a havoc.
  825. If you do decide to change it.Please write the original one down somewhere
  826. and change back.Try not to leave to many traces after you had your fun.
  827. In choice number 1 you will be asked for the login and then the new one.
  828. In choice number 2 you will asked for the login and then supplied by it correct
  829. password and enter a new one.
  830. In choice 3 this is used to a pchange the login shell ** Use full **
  831. The above utilites can be used separatly for eg( To change a password one
  832. coulfd enter: $sysadm chgpasswd not chapassword ,The rest are same)
  833.  
  834. $sysadm deluser - This is an obviously to delete a user
  835. password: 
  836.    
  837. This will be the screen output:
  838. /---------------------------------------------------------------------------\
  839. Running subcommand 'deluser' from menu 'usermgmt'
  840. USER MANAGEMENT  
  841. This fuction completely removes the user,their mail file,home directory
  842. and all files below their home directory from the machine.
  843.  
  844. Enter login ID you wish to remove[q]:      (eg.cathy)
  845. 'cathy' belongs to 'Cathy Franklin'
  846. whose home directory is /usr/cathy
  847. Do you want to remove this login ID 'cathy' ? [y,n,?,q] : 
  848.  
  849. /usr/cathy and all files under it have been deleted.
  850.  
  851. Enter login ID you wish to remove [q]:
  852. \--------------------------------------------------------------------------/ 
  853. This command deletes everthing owned by the user.Dont use it even if you have
  854. access to it.
  855.  
  856.  
  857.  
  858. other super user commands:
  859. --------------------------
  860. wall [text] control-d  - to send an anouncement to users logged in(will
  861.                           override mesg -n command).Execute only from /     
  862. /etc/newgrp - is used to become a member of a group
  863.  
  864. sysadm [program name]
  865.         delgroup - delets groups
  866.         whoson - self explanatory
  867.         lsgroup - Lists group
  868.         mklineset -hunts various sequences
  869.         lsuser -lists all the users & their logins names
  870.  
  871. Other commands may require file system to be mounted.
  872.   
  873.  
  874.                        Basic Networking utility(BNU)
  875.                        -----------------------------
  876.  
  877. The BNU is a unique feature in UNIX.Some systems may not have this installed.
  878. What BNU does is allow other remote UNIXes communicate with yours without
  879. logging off the present one.BNU also allowes file transfer between computers.
  880. Most UNIX systems V will have this feature installed.
  881.  
  882. The user program like cu,uux etc are located in the /usr/bin directory
  883.  
  884. Basic Networking Files:
  885. -----------------------
  886. /usr/lib/uucp/[file name] 
  887.  [file name]
  888.  systems - cu command to establishes link.Contains info on remote computers
  889.            name,time it can be reached,login Id,password,telephone numbers
  890.  devices - inter connected with systems files(Automatic call unit same in two
  891.            entries)also cantains baud rate,port tty1 etc.
  892.                 
  893.  dialers - where asscii converation must be made before file tranfers etc.
  894.  dialcodes - contains abreiviations for phone numbers that can be used in
  895.              systems file
  896.  
  897.  other files are sysfiles,permissions,poll,devconfig
  898.  
  899. B.N.U Aministrative files:
  900. --------------------------
  901. There are 5 admnistrative files present.These are files are created in the
  902. /usr/spool directory .These A.Files are responsible for various BNU procceses
  903. like kepping records data ,files tranfers bettwenn remote and local and also
  904. usefull to lock devices.
  905.  
  906. TM - This file used to hold temporary data .When tranfering the files from a  
  907.      remote to local the /usr/spool/uucp/[name of the remote computer ] creates
  908.      this in the format of as of below:
  909.        
  910.      TM[Process Identification Number].[ddd]
  911.  
  912.      The ddd is the a 3 digit number (sequential) starting with "0"
  913.      Here a typical eg: TM322.012
  914.      Then this file is moved into the path defined by the C.sysnxxx file
  915.  
  916. X.[Execute files] - Created in the /usr/spool before you execute the commands
  917.                     in remote.
  918.                     The format used to name this file is X.sysnxxx
  919.                     where sys stand for the remote name and n is the priority
  920.                     level the xxxx is a sequence assingned by the uucp.These
  921.                     files always contain the Name of the file ,Comuter & file
  922.                     name to recieve,Persons login & computer name and the
  923.                     command string.
  924.  
  925. LCK - The lock file created in the /usr/spool/locks directory.The is used when
  926.       devices are being used.Prevent usage of the same calling device.
  927.       
  928.      Format used: LCK.str wher the str is a device name.The Lock file contains
  929.      the PID needed to lock
  930.  
  931. C.sysnxxx - created in the usr/spool directory.These are the work files.Used  
  932.             when work is in line,remote execeutions.Format is same as the     
  933.             X.sysnxxxx.The works files contain the full path name of the file
  934.             to be sent,path name of the destination (TM Transfers),Remote login
  935.             name to be notified after the file transmision is complete,Users
  936.             login name and the name of the programs used eg.uucp,uupick etc.
  937.           
  938. D - The data files.Format used is  D.systmxxxxyyy.These files are created when
  939.     specified in a command to copy to the spool directory.Eg. By the usage of
  940.     uucp -C this will be true.       
  941.     The systm is the remote name,xxxx is the the 4 digits seq assingned by
  942.     the uucp.The yyy is a sub sequence number.
  943.  
  944. Logining on to remote and sending+receiving files
  945. -------------------------------------------------
  946.  cu - This command allows one to log on to the local as well as the remote
  947.       Unix (or a non unix)without haveing to hang up so you can transfer files.
  948.       Usage:[options]
  949.  
  950.   $ cu [-s baud rate][-o odd parity][-e even parity][-l name of comm line]
  951.        telephone number | systemname
  952.  
  953.   To view system names that you can communicate with use the 'unname' command:
  954.   Eg. of output of names:
  955.  
  956.   ATT01
  957.   ATT02
  958.   ATT03
  959.   ATT04
  960.  
  961.  
  962. $ cu -s300 3=9872344 (9872344 is the tel#)
  963.  connected
  964.  login:
  965.  password:
  966.  
  967. local strings:
  968. --------------
  969. <~.> - will log you off the remote terminal but not the local
  970. ~! - out you on the local withiout disconnecting the line from remote
  971. <control-d> - puts you back on the remote unix
  972. ~%take [file name] - takes a copy of the file name and copies it to the
  973.                      local(the directory which you are in)
  974. "%put [file name] - reverse of above
  975. ~$[command] - allows the execution of a command to the local from remote
  976.  
  977. ct         
  978. --         
  979. ct allows local to connect to remote.Initiates a getty on a remote terminal.
  980. Usefull when using a remote terminal.BNU has call back feature that allows
  981. the user on the remote who can execute a call back meaning the local can call
  982. the remote.[   ] are options
  983.  
  984. $ ct [-h prevent automatic hang up][-s bps rate][-wt set a time to call back
  985.      abbrieviated t mins] telephone number
  986.  
  987. uux          
  988. ---        
  989. To execute commands on a remote (unix to unix)       
  990. usage:[  ] are options
  991.  
  992. $ uux [- use standard output][-n prevent mail notification][-p also use
  993.       standard output] command-string                        
  994.  
  995. uucp                              
  996. ----             
  997. uucp copies files from ones computer to the home directory
  998. of a user in remote system.This also works when copying files from one
  999. directory to another in the remote.The remote user will be notified by mail.
  1000. This command becomes use full when copying files from a remote to your local
  1001. system.
  1002. The uucp requires the uucico daemon will call up the remote and will perform
  1003. file login sequence,file transfer and notify the user by mail.
  1004. Daemons are programs runining in the background.The 3 daemons in a Unix are
  1005. uucico,uusched,uuxqt.
  1006.  
  1007.  Daemons Explained:[nows a good time to explain the 3 daemons]
  1008.  ------------------
  1009.  
  1010.  uuxqt - Remote execution.This daemon is executed by uudemon.hour started by
  1011.          cron.UUXQT searchs in the spool directory for executable file
  1012.          named X.file sent from the remote system.When it finds a file X.file
  1013.          where it obtains process which are to be executed.The next step is 
  1014.          to find weather the processes are available at the time.The if     
  1015.          available it checks permission and if everthing is o.k it proceeds
  1016.          the background proccess.
  1017.  
  1018.  uucico - This Daemon is very immportant for it is responsible in establishing
  1019.           a connection to the remote also checks permission,performs login
  1020.           procedures,transfers + executes files and also notifies the user
  1021.           by mail.This daemon is called upon by uucp,uuto,uux commands.
  1022.  
  1023.  uusched - This is executed by the shell script called uudemon.hour
  1024.            This daemons acts as a randomizer before the UUCICO daemon is
  1025.            called.
  1026.  
  1027.  
  1028. Usage of uucp command:
  1029.  
  1030. $ uucp [options] [first full path name!] file [destination path!] file
  1031. example:
  1032. $ uucp -m -s bbss hackers unix2!/usr/todd/hackers
  1033.  
  1034. What this would do is send the file hackers from your computer to the remotes
  1035. /usr/todd/hackers making hackers offcourse as file.todd would mail that
  1036. a file has been sent to him.The unix2 is the name of the remote.
  1037. Options for uucp:(Dont forget to type in remotes name unix2 in case)         
  1038. -c  dont copy files to spool directory
  1039. -C  copy to spool
  1040. -s[file name] - this file will contain the file status(above is bbss)
  1041. -r  Dont start the comm program(uucico) yet
  1042. -j  print job number(for above eg.unix2e9o3)
  1043. -m  send mail when file file is complete
  1044.  
  1045. Now suppose you wanted to receive file called kenya which is in the usr/dan/usa
  1046.  to your home directory /usr/john assuming that the local systems name is
  1047. ATT01 and you are currently working in /usr/dan/usa,you would type in:
  1048.  
  1049. $uucp kenya ATT01!/usr/john/kenya
  1050.  
  1051. uuto         
  1052. ----          
  1053. The uuto command allows one to send file to remote user and can also be used
  1054. to send files locally.
  1055. Usage:
  1056. $ uuto [file name] [system!login name]( omit systen name if local)
  1057.  
  1058.  
  1059.  
  1060. Conclusion:
  1061. -----------
  1062. Theres always more one can say about the UNIX but its time to stop.
  1063. I hope you have enjoyed the article.I apologize for the lenght. I hope I
  1064. made the UNIX operating system more familiar.
  1065. Remember do not abuse any systems you hack into for a true hacker doesn't like
  1066. to reck but to learn.
  1067. I can be reached at (718)358/9209 - Hackers Den88 [2600 BBS #5]
  1068.  
  1069. Watch for my new article on using PANAMAC airline computers coming soon.
  1070.  
  1071.  
  1072.                            Red Knight
  1073.                              P/HUN!  
  1074.                            <<T.S.A.N>>
  1075.  
  1076. Leached off SSC (713) 497-2312
  1077.  
  1078. [13] [UNIX system specifics (all versions)]
  1079. (98) Minutes Remaining
  1080. (G-Files Menu) Command <?-Help>: [
  1081.  
  1082. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  1083.  Another file downloaded from:                     The NIRVANAnet(tm) Seven
  1084.  
  1085.  & the Temple of the Screaming Electron   Taipan Enigma        510/935-5845
  1086.  Burn This Flag                           Zardoz               408/363-9766
  1087.  realitycheck                             Poindexter Fortran   510/527-1662
  1088.  Lies Unlimited                           Mick Freen           801/278-2699
  1089.  The New Dork Sublime                     Biffnix              415/864-DORK
  1090.  The Shrine                               Rif Raf              206/794-6674
  1091.  Planet Mirth                             Simon Jester         510/786-6560
  1092.  
  1093.                           "Raw Data for Raw Nerves"
  1094. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100. ... texts ...